package com.xiaohudie.thread;

import lombok.SneakyThrows;

/**
 * @Author xiao hu die
 * @Date 2022/2/21 11:38
 * @Version 1.0
 */
public class Test06 {
    public static void main(String[] args) {
        Thread06 thread06 = new Thread06();
        thread06.start();
        /**唤醒线程*/
        thread06.interrupt();
        System.out.println(Thread.currentThread().getName());
    }
static class Thread06 extends Thread{

    @Override
    public void run() {
        try {
            Thread.sleep(1000*60*60*24);
        } catch (InterruptedException e) {
           // e.printStackTrace();
            System.out.println(Thread.currentThread().getName()+"被唤醒了");
        }
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName());
        }
    }
}
}
